<template>
  <div class="course-item">
    <div class="ci-left-img">
      <img :src="`https://ss.lanqb.com/${course.profile.avatar}`" alt="" />
    </div>
    <div class="ci-right-content">
      <h3>{{ course.title }}</h3>
      <p>
        <span>{{ course.profile.nickname }}</span
        ><span>共{{ course.preview_setting.lessons_count }}节</span>
      </p>
      <p>{{ course.study_num }}人在学</p>
    </div>
  </div>
</template>

<script>
export default {
  name: "CourseItem",
  props: ["course"],
  data() {
    return {};
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.course-item {
  height: 112px;
  width: 343px;
  margin: 0 auto;
  margin-top: 16px;
  display: flex;
  > .ci-left-img {
    width: 150px;
    height: 112px;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .ci-right-content {
    width: 176px;
    height: 112px;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    p {
      font-size: 14px;
      color: gray;
    }
  }
}
</style>
